package com.robaone.gwtgenerator.server;

import java.util.Map;

import com.robaone.gwtgenerator.client.DataService;
import com.robaone.gwtgenerator.client.data.GWTData;
import com.robaone.gwtgenerator.server.interfaces.GWTManagerInterface;
import com.robaone.gwtgenerator.shared.FieldVerifier;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

/**
 * The server side implementation of the RPC service.
 */
@SuppressWarnings("serial")
public class DataServiceImpl extends RemoteServiceServlet implements
		DataService {

	@Override
	public GWTData convertHTMLtoGWT(String value) throws Exception {
		Map parameters = this.getThreadLocalRequest().getParameterMap();
		GWTManagerInterface man = ManagerFactory.newGWTManager(parameters);
		GWTData retval = man.convertHTMLtoGWT(value);
		return retval;
	}
}
